home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 - Homepage / CHIP.BIN / share / webmaste / csehtmlp / csehtmlp.exe / {app} / ParserRules / css_lev2.xs < prev    next >
Encoding:
Text File  |  2002-04-22  |  4.4 KB  |  137 lines

  1. //Language: CSS, Level2
  2. //Copyright (c) 1992-2002 Altium Limited             
  3. //All rights reserved.                               
  4. //http://www.dream-com.com                           
  5. //contact@dream-com.com                              
  6.  
  7. // states
  8. State=snormal
  9. State=sstring1
  10. State=sstring2
  11. State=sstring3
  12. State=sstring4
  13. State=scomment1
  14. State=scomment2
  15. State=scomment3
  16. State=scomment4
  17. State=sstyle
  18. // tokens
  19. Token=tnone
  20. Token=tstring
  21. Token=tcomment
  22. Token=tident
  23. Token=tinteger
  24. Token=tfloat
  25. Token=tresword
  26. Token=tassembler
  27. Token=turl
  28. Token=twhitespace
  29. Token=tdirective
  30. //delims
  31. Delimiters=;.,:'"{}[]()?!@#$%^&*-+=|\/
  32.  
  33. //idents
  34. snormal   [a-z_A-Z][a-z_A-Z0-9]*  snormal   tident
  35.  
  36. //white space
  37. snormal #32*                      snormal   twhitespace
  38.  
  39. //strings
  40. snormal     \"                     sstring1   tstring
  41. sstring1    [^\"]*                 sstring1   tstring
  42. sstring1    \"                     snormal    tstring
  43. sstring1    \"\"                   sstring1   tstring
  44. sstring1    $                      snormal    tstring
  45.  
  46. //comments
  47. snormal   <\!--                    scomment1 tcomment
  48. scomment1 [^\-]*                   scomment1 tcomment
  49. scomment1  -->                     snormal   tcomment
  50.  
  51. snormal   /\*                     scomment2 tcomment
  52. scomment2 [^\*]*                  scomment2 tcomment
  53. scomment2 \*[^/]                  scomment2 tcomment
  54. scomment2 [\*]*/                  snormal   tcomment
  55.  
  56. //Common
  57. snormal \{                          sstyle   tresword
  58. sstyle  \}                          snormal  tresword
  59.  
  60. // reswords
  61. sstyle 'align'      sstyle tresword
  62. sstyle 'attachment' sstyle tresword
  63. sstyle 'auto'       sstyle tresword
  64. sstyle 'background' sstyle tresword
  65. sstyle 'border'     sstyle tresword
  66. sstyle 'bottom'     sstyle tresword
  67. sstyle 'clear'      sstyle tresword
  68. sstyle 'color'      sstyle tresword
  69. sstyle 'decoration' sstyle tresword
  70. sstyle 'display'    sstyle tresword
  71. sstyle 'family'     sstyle tresword
  72. sstyle 'float'      sstyle tresword
  73. sstyle 'font'       sstyle tresword
  74. sstyle 'height'     sstyle tresword
  75. sstyle 'image'      sstyle tresword
  76. sstyle 'indent'     sstyle tresword
  77. sstyle 'left'       sstyle tresword
  78. sstyle 'letter'     sstyle tresword
  79. sstyle 'line'       sstyle tresword
  80. sstyle 'list'       sstyle tresword
  81. sstyle 'margin'     sstyle tresword
  82. sstyle 'padding'    sstyle tresword
  83. sstyle 'position'   sstyle tresword
  84. sstyle 'repeat'     sstyle tresword
  85. sstyle 'right'      sstyle tresword
  86. sstyle 'size'       sstyle tresword
  87. sstyle 'space'      sstyle tresword
  88. sstyle 'spacing'    sstyle tresword
  89. sstyle 'style'      sstyle tresword
  90. sstyle 'text'       sstyle tresword
  91. sstyle 'through'    sstyle tresword
  92. sstyle 'top'        sstyle tresword
  93. sstyle 'transform'  sstyle tresword
  94. sstyle 'type'       sstyle tresword
  95. sstyle 'variant'    sstyle tresword
  96. sstyle 'vertical'   sstyle tresword
  97. sstyle 'weight'     sstyle tresword
  98. sstyle 'white'      sstyle tresword
  99. sstyle 'width'      sstyle tresword
  100. sstyle 'word'       sstyle tresword
  101.  
  102. // numbers
  103. sstyle [1-9][0-9]*                            sstyle  tinteger
  104. sstyle \#[0-9A-F]+                            sstyle  tinteger
  105. sstyle [1-9][0-9]*\.[0-9]*                    sstyle  tfloat
  106. sstyle [1-9][0-9]*{\.[0-9]+}|e{[\+\-]}|[0-9]+ sstyle  tfloat
  107.  
  108. //idents
  109. sstyle   [A-Z_a-z][0-9A-Z_a-z]*  sstyle   tident
  110.  
  111. //white space
  112. sstyle #32*                      sstyle  twhitespace
  113.  
  114. //comments
  115. sstyle    <\!--                    scomment3 tcomment
  116. scomment3 [^\-]*                   scomment3 tcomment
  117. scomment3  -->                     sstyle    tcomment
  118.  
  119. sstyle    /\*                     scomment4 tcomment
  120. scomment4 [^\*]*                  scomment4 tcomment
  121. scomment4 \*[^/]                  scomment4 tcomment
  122. scomment4 [\*]*/                  sstyle    tcomment
  123.  
  124.  
  125. //strings
  126. sstyle      \"                     sstring3    tstring
  127. sstring3    [^\"]*                 sstring3    tstring
  128. sstring3    \"                     sstyle      tstring
  129. sstring3    \"\"                   sstring3    tstring
  130. sstring3    $                      sstyle      tstring
  131.  
  132. sstyle      \'                     sstring4    tstring
  133. sstring4    [^\']*                 sstring4    tstring
  134. sstring4    \'                     sstyle      tstring
  135. sstring4    \'\'                   sstring4    tstring
  136. sstring4    $                      sstyle      tstring
  137.